package com.springboot.seckill.service.model;

import java.math.BigDecimal;

/**
 * 用户下单的交易模型
 *
 * @Author: HuangDekai
 * @Date: 2022/3/23 22:20
 * @Version: 1.0
 * @since: jdk11
 */
public class OrderModel {

    /**
     * 主键id
     */
    private Integer id;

    /**
     * 订单id
     */
    private String orderId;


    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 商品id
     */
    private Integer itemId;

    /**
     * 购买时的商品价格, 若promoId若非空, 表示秒杀商品价格
     */
    private BigDecimal itemPrice;

    /**
     * 若非空, 则表示以秒杀商品下单
     */
    private Integer promoId;


    /**
     * 购买数量
     */
    private  Integer amount;

    /**
     * 购买总金额,若promoId若非空, 表示秒杀商品价格
     */
    private BigDecimal orderPrice;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getItemId() {
        return itemId;
    }

    public void setItemId(Integer itemId) {
        this.itemId = itemId;
    }

    public BigDecimal getItemPrice() {
        return itemPrice;
    }

    public void setItemPrice(BigDecimal itemPrice) {
        this.itemPrice = itemPrice;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public BigDecimal getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(BigDecimal orderPrice) {
        this.orderPrice = orderPrice;
    }

    public Integer getPromoId() {
        return promoId;
    }

    public void setPromoId(Integer promoId) {
        this.promoId = promoId;
    }
}
